<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* ul > li:first-child{
            color: red;
        } */

        /* ul > li:last-child{
            color: red;
        } */

        /* ul > li:nth-child(2n + 1){
            color: red;
        } */

        /* ul > li:nth-child(2n){
            color: red;
        } */

        /* ul > li:nth-child(odd){
            color: red;
        } */

        /* ul > li:nth-child(even){
            color: red;
        } */

        /* ul > li:first-of-type{
            color: red;
        } */

        /* ul > li:nth-of-type(2){
            color: red;
        } */

        /* 除了第3个都不生效 */
        ul > li:not(:nth-of-type(3)){
            color: yellowgreen;
        }
    </style>
</head>
<body>
    <ul>
        <!-- 加了span后台，first-of-type也能生效 -->
        <span>我是一个span</span>
        <li>第〇个</li>
        <li>第一个</li>
        <li>第二个</li>
        <li>第三个</li>
        <li>第四个</li>
        <li>第五个</li>
    </ul>
</body>
</html>